Get the size of a fileΒΆ

Get the size of a file.
import os

file_size = os.path.getsize("abc.txt")
print("The size of abc.txt is :", file_size, " bytes")

Output:

The size of abc.txt is : 0 bytes